# -*- coding: utf-8 -*-
# @Author   : niejiali
# @Time     : 2019/2/15 10:30
# @File     : __contextmanger.py
# @Software : PyCharm
import contextlib


@contextlib.contextmanager
def mytest():

    print("XXx")

    yield 1

    print("xx120")


with mytest() as f:
    print(f)
    print("xcc")